<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .big {
            width: 250px;
            height: 250px;
            background-color: #f5dc3a;
        }
        .mid {
            width: 150px;
            height: 150px;
            background-color: #e15761;
        }
        .small {
            width: 100px;
            height: 100px;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div class="big">
        <div class="mid">
            <div class="small"></div>
        </div>
    </div>
    <script>
        var big = document.querySelector('.big')
        var mid = document.querySelector('.mid')
        var small = document.querySelector('.small')

        // 第三个参数如果是true就是捕获 如果是false就是冒泡，默认是冒泡
        big.addEventListener('click', function() {
            console.log('big');
        }, true) 
        mid.addEventListener('click', function() {
            console.log('mid');
        }, true) 
        small.addEventListener('click', function() {
            console.log('small');
        }, true) 
    </script>
</body>
</html>